package org.chench.test.helloserviceclient.feign.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Desc: 注解声明方式定义服务消费接口
 * Name: org.chench.test.helloserviceclient.feign.service.HelloService
 * Author: chench9@lenovo.com
 * Date: 2018/4/25 17:37
 **/
@FeignClient("hello-service")
public interface HelloService {

    // Spring Cloud Feign提供了对Spring MVC的支持
    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name);
}
